package com.eclipse.e0113_网络编程.模拟浏览器发送请求;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.net.Socket;
import java.net.UnknownHostException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


public class HttpClient {
	public static void main(String[] args) throws UnknownHostException, IOException {
		Socket client = new Socket("172.20.10.2", 8081);
		OutputStream outputStream = client.getOutputStream();
		BufferedWriter out = new BufferedWriter(new OutputStreamWriter(outputStream));
		InputStream inputStream = client.getInputStream();
		BufferedReader in = new BufferedReader(new InputStreamReader(inputStream));
		
//		List<String> list = Files.readAllLines(Paths.get("/Users/liuzhuangzhuang/iotest/a.txt"));
//		for (String temp : list) {
//			System.out.println(temp);
//		}
	}
	
	
}
